<template>
	<view>
	<u-tabbar
		:value="tabbarIndex"
		@change="changeTabbar"
		:fixed="true"
		:placeholder="true"
		:safeAreaInsetBottom="true"
	>
		<u-tabbar-item text="商城" icon="home" ></u-tabbar-item>
		<u-tabbar-item text="购物车" icon="photo" ></u-tabbar-item>
		<u-tabbar-item text="我的订单" icon="account" ></u-tabbar-item>
	</u-tabbar>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				tabbarIndex : uni.getStorageSync('uniformShopIndex'),
			}
		},
		methods: {
			changeTabbar:function(e){
				if(e==this.tabbarIndex) return
				this.tabbarIndex = e
				uni.setStorageSync('uniformShopIndex',e)
				if(e==0)
			   this.replacePage("/pages/componentsC/uniformshop/uniformshop")
			   if(e==1)
			   this.replacePage("/pages/componentsC/uniformshop/uniformshopcart")
			   if(e==2)
			   this.replacePage("/pages/componentsC/uniformshop/uniformshopOrder")
			},
			onShow: function() {
			
			},
			onHide: function() {
				
			},
		}
	}
</script>

<style>
</style>